package com.xy.annotaion.handler.kotlin.compiler.demo1

abstract class Token(private val lineNumber: Int) {

    companion object {
        val EOF = object : Token(-1) {}
        val EOL = "\n"
    }

    open fun isIdentifier() = false
    open fun isNumber() = false
    open fun isString() = false
    open fun getNumber(): Int = throw StoneException("not number token")
    open fun getText() = ""

    fun getLineNumber() = lineNumber

}


